<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<jsp:include page="/include/isLogin.jsp"></jsp:include>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<html>
<head>
	<title>YYJ</title>
	<!-- jQuery-easyui -->
	<jsp:include page="/include/jQuery.easyui.lib.jsp"></jsp:include>
	<!-- web style -->
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/csslib/web/main.css">
</head>

<body class="easyui-layout">
	
	<!-- header -->
    <div region="north" split="false" class="header" >
        <div style="float:right; padding-top: 20px;" >
        	<div id="sysTheme">
        		主题选择：
	        	<a href="#" theme="gray" onclick="changeTheme('gray')">[灰色]</a>
				<a href="#" theme="default" onclick="changeTheme('default')">[浅蓝]</a>
        	</div>
	        <div style="padding: 5px 4px 0 0">
	        	欢迎<span style="color: red;">${loginUser.name }</span>
	        	<a href="#" onclick="loginOut()">[注销]</a>
	        	<a href="#" onclick="editPsw()">[修改密码]</a>
				<a href="#" onclick="exitSystem()">[安全退出]</a>
			</div>
        </div>
    </div>
    
	<!-- footer #D2E0F2 -->
    <div region="south" split="false" style="height: 30px; background: #fff; text-align: center;">
        <div class="footer" style="margin-top: 5px;">技术支持：XXOO</div>
    </div>
	
	<!-- left -->
	<div id="navMenu" region="west" minWidth="150" maxWidth="180" split="false" icon="icon-menu" title="导航菜单" style="width:175px;">  
	    <!-- 角色菜单 -->
	    <a id="navHrefCtl" target="mainFrame" href="javascript:void(0)"></a>
	</div>  
	
	<!-- center -->
	<div region="center">  
	    <div id="main-center" class="easyui-tabs" fit="true" border="false">  
	        <div icon="icon-home" title="欢迎使用" style="padding:10px 10px 0 10px;"> 
	        	
	        </div>  
	    </div>  
	</div>
	
	<!-- edit password -->
    <div id="editPswWind" icon="icon-set" style="width: 300px; height: 204px; padding: 4px; background: #fafafa; display: none;">
        <div class="easyui-layout" fit="true">
            <div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
	            <form id="editPswForm" name="editPswForm" method="post">
	                <table>
	                	<tr>
	                        <td>现有密码：</td>
	                        <td><input name="psw" type="password" class="easyui-validatebox" required="true" validType="length[2,20]"/></td>
	                    </tr>
	                    <tr>
	                        <td>新密码：</td>
	                        <td><input name="newpsw" type="password" class="easyui-validatebox" required="true" validType="length[2,20]"/></td>
	                    </tr>
	                    <tr>
	                        <td>确认密码：</td>
	                        <td><input name="repsw" type="password" class="easyui-validatebox" required="true" validType="length[2,20];reinput[$('input[name=newpsw]').val(),$('input[name=repsw]').val()]"/></td>
	                    </tr>
	                </table>
	            </form>
            </div>
            <div region="south" border="false" style="text-align: right; height: 30px; line-height: 30px;">
                <a class="easyui-linkbutton" icon="icon-ok" href="#" onclick="$('#editPswForm').submit()" >确定</a>
				<a class="easyui-linkbutton" icon="icon-cancel" href="#" onclick="$('#editPswWind').window('close')">取消</a>
            </div>
        </div>
    </div>
	
	<script type="text/javascript" src="main.js"></script>
	<script type="text/javascript">

		$(function(){
			//$("a[theme='${loginUser.theme }']").css("color", "red");
		});

		function changeTheme(theme){
			if(lastTab){// 关闭上一tab标签
				//$('#main-center').tabs('close', lastTab);
			}
			jQuery.ajax({
				url: "user.action?command=changeTheme&theme=" + theme,
				type: "post",
				cache: false,
				success: function(result){
					if("true" == result){
						$.messager.alert("友情提示", "您的操作成功!", "info");
						$("#theme").attr("href", "${pageContext.request.contextPath }/csslib/easyui/themes/"+ theme +"/easyui.css")
						//$("a[theme='"+ theme +"']").css("color", "red");
					}else{
						$.messager.alert("友情提示", "您的操作失败!", "error");
					}
				}
			});
		}
	
	</script>
  
</body>
</html>
